package com.zhijian.warehouse.manage.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 实验枚举类
 *
 * @author HCG
 * @version 1.0
 * @date 2023-11-16
 */
public class ExpEnum {

    /**
     * 工序枚举类
     */
    @AllArgsConstructor
    @Getter
    public enum StepEnum {

        ZLGZ(1, "制粒干燥"),
        FSGS(2, "粉碎过筛"),
        PLCZ(3, "配料称重"),
        YPSC(4, "压片生产"),
        YPJAZ(6, "压片机安装"),
        ZLZH(5, "整粒总混");

        private Integer code;
        private String desc;

        public static StepEnum getByCode(Integer code) {
            StepEnum[] values = StepEnum.values();
            for (StepEnum anEnum : values) {
                if (anEnum.getCode().equals(code)) {
                    return anEnum;
                }
            }
            return null;
        }
    }
}
